//
//  JRFMDB+Telen.h
//  TimeTools
//
//  Created by telen on 15/4/27.
//  Copyright (c) 2015年 Telen. All rights reserved.
//

#import "JRFMDatabase.h"

@interface JRFMDatabase (Telen)

//把字典，转为replace 语句
+(NSString*) Sql_ReplaceDict:(NSDictionary*) record forTable:(NSString*)table;

//把字典，转为Insert 语句
+(NSString*) Sql_InsertDict:(NSDictionary*) record forTable:(NSString*)table;

//克隆，sqlite db，需要先open及setkey
+ (BOOL)JRFMDB_Clone_Opened_DB:(JRFMDatabase*) db1 toOpened_DB:(JRFMDatabase*) db2;

//DB 版本管理
+ (long)JRFMDB_getVersionFromDB:(JRFMDatabase*) db;
+ (void)JRFMDB_setDB:(JRFMDatabase*) db version:(long)ver;

//表操作  添加一列
+ (BOOL)JRFMDB_addClumName:(NSString*)clumName ClunType:(NSString*)clunType forDB:(JRFMDatabase*)db forTable:(NSString*)tableName;

//表操作  修改表名
+ (BOOL)JRFMDB_modifyTableName:(NSString*)oldTableName toTableName:(NSString*)tableName forDB:(JRFMDatabase*)db;

@end
